﻿Imports Microsoft.VisualBasic

Public Class UdtDataController

    Public Shared Function GetInstances(ByVal PortalId As Integer) As Generic.IDictionary(Of String, String)
        'SELECT        M.ModuleID, T.TabPath, M.ModuleTitle, M.PortalID
        Dim dr As IDataReader = DataProvider.Instance.ExecuteReader("EventPublisher_UserDefinedTables_GetList", PortalId)
        Dim dic As New Generic.Dictionary(Of String, String)
        While dr.Read
            Dim moduleID As Integer = dr.GetInt32(0)
            Dim TabPath As String = dr.GetString(1)
            Dim Title As String = dr.GetString(2)

            dic.Add(String.Format("{0}|{1}", moduleID, TabPath), String.Format("{0} @ {1}", Title, TabPath.Replace("//", "")))
        End While
        Return dic
    End Function

End Class
